package com.ray.service;

import com.ray.pojo.Student;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class StudentAutowiredByTypeImpl
{
    public void getStudentAutowiredByName()
    {
        ClassPathXmlApplicationContext cpx = new ClassPathXmlApplicationContext("applicationContext.xml");
        Student studentAutowiredByName = cpx.getBean("studentAutowiredByType", Student.class);
        System.out.println(studentAutowiredByName.toString());
    }
}
